import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'normalize.css/normalize.css'
import './assets/iconfont/iconfont.css'

import lodash from 'lodash'
Vue.use(lodash)


import VueLazyload from 'vue-lazyload'
// // Vue.use(VueLazyload)
Vue.use(VueLazyload, {
  // preLoad: 1.3,
  // attempt: 2,
  // error: require('./assets/img/006.jpg'),
  // loading: require('./assets/fufu.png')
  loading: './assets/fufu.png'
})

import moment from 'moment'
//  全局过滤器 时间戳
Vue.filter('timeFormat', function (val, format = 'YYYY-MM-DD HH:mm:ss') {
  if (val) {
    return moment(val).format(format)
  } else {
    return val
  }
})

import Toast from '@/components/commom/toast/index.js'
Vue.use(Toast)

import VueAwesomeSwiper from 'vue-awesome-swiper'
// 轮播图
import 'swiper/swiper-bundle.css'
Vue.use(VueAwesomeSwiper)
import Swiper2, {
  Navigation,
  Pagination,
  EffectFade,
  Autoplay
} from 'swiper'
Swiper2.use([Navigation, Pagination, EffectFade, Autoplay])

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
